<?php
if (!isset($_SESSION)) session_start();

//print_r ($_SESSION);


$path1 = "{$_SERVER["DOCUMENT_ROOT"]}/modules/section_header/templates/{$_SESSION["area"]}/{$_SESSION["section"]}/images/banner";
//echo $path1;
mkdir ($path1, 0, true);

if (array_key_exists('ufile',$_FILES)) {
 		foreach ($_FILES['ufile']['name'] as $key => $NAME) {
 				 if ($NAME != "") {
				   // echo "{$NAME}";
 				 		$path1= "{$path1}/{$NAME}";
				 		copy($_FILES['ufile']['tmp_name'][$key], $path1);
						echo "File Name :".$_FILES['ufile']['name'][$key]."<BR/>";
						echo "File Size :".$_FILES['ufile']['size'][$key]."<BR/>";
						echo "File Type :".$_FILES['ufile']['type'][$key]."<BR/>";
						$filesize1=$_FILES['ufile']['size'][$key];
						if($filesize1  != 0) echo "We have received your files";
            else echo "ERROR.....";	
				 }
 		 }
} else echo "An error";


?>